<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="module">
    import Promise from "./index.js";

    new Promise((resolve, reject) => {
        resolve(100);
    }).then(value => {
        console.log(value);// 100
        return value + 1;
    }).then(value => {
        console.log(value);// 101
        return new Promise(resolve => {
            setTimeout(() => {
                resolve(value + 20)
            }, 1000)
        })
    }).then(value => {
        console.log(value);// 121
        return value + 1;
    }).then(value => {
        console.log(value);// 103
        return value + 1;
    })
</script>
</html>